

package com.hazelcast.internal.eviction;

/**
 * Interface for entries, records or whatever that can be evicted.
 */
public interface Evictable<V> {

    /**
     * Gets the value of this {@link Evictable}.
     *
     * @return the value of this {@link Evictable}
     */
    V getValue();

    /**
     * Gets the access hit count of this {@link Evictable}.
     *
     * @return the access hit count of this {@link Evictable}
     */
    long getHits();

    /**
     * Gets the creation time of this {@link Evictable} in milliseconds.
     *
     * @return the creation time of this {@link Evictable} in milliseconds
     */
    long getCreationTime();

    /**
     * Gets the latest access time difference of this {@link Evictable} in milliseconds.
     *
     * @return the latest access time of this {@link Evictable} in milliseconds
     */
    long getLastAccessTime();
}
